Optimal. Leaf size=59 \[ \frac{a^{3/2} \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{b^2 \sqrt{a+b}}-\frac{x (2 a-b)}{2 b^2}+\frac{\sinh (x) \cosh (x)}{2 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.105552, antiderivative size = 59, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {3187, 470, 522, 206, 208} \[ \frac{a^{3/2} \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{b^2 \sqrt{a+b}}-\frac{x (2 a-b)}{2 b^2}+\frac{\sinh (x) \cosh (x)}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3187
Rule 470
Rule 522
Rule 206
Rule 208
Rubi steps
\begin{align*} \int \frac{\cosh ^4(x)}{a+b \cosh ^2(x)} \, dx &=\operatorname{Subst}\left (\int \frac{x^4}{\left (1-x^2\right )^2 \left (a-(a+b) x^2\right )} \, dx,x,\coth (x)\right )\\ &=\frac{\cosh (x) \sinh (x)}{2 b}+\frac{\operatorname{Subst}\left (\int \frac{a+(a-b) x^2}{\left (1-x^2\right ) \left (a+(-a-b) x^2\right )} \, dx,x,\coth (x)\right )}{2 b}\\ &=\frac{\cosh (x) \sinh (x)}{2 b}+\frac{a^2 \operatorname{Subst}\left (\int \frac{1}{a+(-a-b) x^2} \, dx,x,\coth (x)\right )}{b^2}-\frac{(2 a-b) \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\coth (x)\right )}{2 b^2}\\ &=-\frac{(2 a-b) x}{2 b^2}+\frac{a^{3/2} \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{b^2 \sqrt{a+b}}+\frac{\cosh (x) \sinh (x)}{2 b}\\ \end{align*}
Mathematica [A] time = 0.127464, size = 52, normalized size = 0.88 \[ \frac{\frac{4 a^{3/2} \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{\sqrt{a+b}}+2 x (b-2 a)+b \sinh (2 x)}{4 b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.036, size = 188, normalized size = 3.2 \begin{align*} -{\frac{1}{2\,b} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-2}}+{\frac{1}{2\,b} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}}-{\frac{a}{{b}^{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }+{\frac{1}{2\,b}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }+{\frac{1}{2\,{b}^{2}}{a}^{{\frac{3}{2}}}\ln \left ( \sqrt{a+b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+2\,\sqrt{a}\tanh \left ( x/2 \right ) +\sqrt{a+b} \right ){\frac{1}{\sqrt{a+b}}}}-{\frac{1}{2\,{b}^{2}}{a}^{{\frac{3}{2}}}\ln \left ( -\sqrt{a+b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+2\,\sqrt{a}\tanh \left ( x/2 \right ) -\sqrt{a+b} \right ){\frac{1}{\sqrt{a+b}}}}+{\frac{1}{2\,b} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-2}}+{\frac{1}{2\,b} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-1}}+{\frac{a}{{b}^{2}}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) }-{\frac{1}{2\,b}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.09016, size = 1638, normalized size = 27.76 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.30963, size = 128, normalized size = 2.17 \begin{align*} \frac{a^{2} \arctan \left (\frac{b e^{\left (2 \, x\right )} + 2 \, a + b}{2 \, \sqrt{-a^{2} - a b}}\right )}{\sqrt{-a^{2} - a b} b^{2}} - \frac{{\left (2 \, a - b\right )} x}{2 \, b^{2}} + \frac{e^{\left (2 \, x\right )}}{8 \, b} + \frac{{\left (4 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} - b\right )} e^{\left (-2 \, x\right )}}{8 \, b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]